package com.sgz.androidlib.others.sample;

import android.os.Bundle;
import android.util.Log;

import com.android.sgzcommon.activity.BaseActivity;
import com.android.sgzcommon.view.TitleBar;
import com.sgz.androidlib.R;
import com.sgz.androidlib.others.SuNBZxingView;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * @author sgz
 * @date 2021-03-01
 */
public class TestScanCodeActivity extends BaseActivity {

    @BindView(R.id.tb_title)
    TitleBar mTbTitle;
    @BindView(R.id.zxingview)
    SuNBZxingView mZxingview;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_scan_code);
        ButterKnife.bind(this);
        mZxingview.synchLifeStart(this);
        mZxingview.setOnCodeResultListener(new OnCodeResultListener() {
            @Override
            public void onResult(String text) {
                Log.d("TestScanCodeActivity", "onResult: text == " + text);
            }
        });
    }
}
